﻿
@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>human_fileFoDelt</title>
    <script src="~/lib/axios/dist/axios.js"></script>
    <script src="~/lib/vue/dist/vue.js"></script>
    <script src="~/lib/element-ui/lib/index.js"></script>
    <link href="~/lib/element-ui/lib/theme-chalk/index.css" rel="stylesheet" />
</head>
<body>
    <div id="app">
        <el-container>
            <el-card class="box-card">
                <el-main>
                    <el-form ref="form" :model="form" label-width="80px" :inline="true" size="mini" :disabled="true">
                        <el-form-item label="档案编号" prop="human_id">
                            <el-input v-model="form.human_id" style="width: 160px " :disabled="true"></el-input>
                        </el-form-item>
                        <el-form-item label="机构选择" prop="valuo">
                            <div class="block">
                                <el-cascader v-model="form.valuo"
                                             :options="form._list"
                                             ref="cascaderAddr"
                                             style="width: 160px "
                                             :disabled="true"></el-cascader>
                            </div>
                        </el-form-item>
                        <el-form-item label="职位名称" prop="valuo1">
                            <div class="block">
                                <el-cascader v-model="form.valuo1"
                                             :options="form._list1"
                                             ref="cascaderAddr1"
                                             style="width:160px "
                                             :disabled="true"></el-cascader>
                            </div>
                        </el-form-item>
                        <el-form-item label="职称" prop="human_pro_designation">
                            <template>
                                <el-select v-model="form.human_pro_designation" placeholder="请选择职称" style="width: 160px ">
                                    <el-option v-for="item in value._lis7"
                                               :key="item.pbc_id"
                                               :disabled="true"
                                               :label="item.attribute_name"
                                               :value="item.attribute_name">
                                    </el-option>
                                </el-select>
                            </template>
                        </el-form-item>
                        <div class="kbl">
                            <el-form-item prop="file">
                                <el-upload class="upload-demo"
                                           action="''"
                                           :file-list="fileList"
                                           list-type="picture-card"
                                           :limit="1"
                                           :auto-upload="false">
                                    <i slot="default" class="el-icon-plus"></i>
                                </el-upload>
                            </el-form-item>
                        </div>
                        <el-form-item label="姓名" prop="human_name">
                            <el-input v-model="form.human_name" style="width: 160px "></el-input>
                        </el-form-item>
                        <el-form-item label="性别" prop="human_sex">
                            <el-select v-model="form.human_sex" placeholder="请选择性别" style="width: 160px ">
                                <el-option label="男" value="男"></el-option>
                                <el-option label="女" value="女"></el-option>
                            </el-select>
                        </el-form-item>
                        <el-form-item label="EMAIL" prop="human_email">
                            <el-input v-model="form.human_email" style="width: 160px "></el-input>
                        </el-form-item>
                        <el-form-item label="电话" prop="human_telephone">
                            <el-input v-model="form.human_telephone" style="width: 160px "></el-input>
                        </el-form-item>
                        <el-form-item label="QQ" prop="human_qq">
                            <el-input v-model="form.human_qq" style="width: 160px "></el-input>
                        </el-form-item>
                        <el-form-item label="手机" prop="human_mobilephone">
                            <el-input v-model="form.human_mobilephone" style="width: 160px "></el-input>
                        </el-form-item>
                        <el-form-item label="住址" prop="human_address">
                            <el-input v-model="form.human_address" style="width: 160px"></el-input>
                        </el-form-item>
                        <el-form-item label="邮编" prop="human_postcode">
                            <el-input v-model="form.human_postcode" style="width: 160px"></el-input>
                        </el-form-item>
                        <el-form-item label="国籍" prop="human_nationality">
                            <template>
                                <el-select v-model="form.human_nationality" placeholder="请选择国籍" style="width: 160px ">
                                    <el-option v-for="item in value._lis"
                                               :key="item.pbc_id"
                                               :label="item.attribute_name"
                                               :value="item.attribute_name">
                                    </el-option>
                                </el-select>
                            </template>
                        </el-form-item>
                        <el-form-item label="出生地" prop="human_birthplace">
                            <el-input v-model="form.human_birthplace" style="width: 160px"></el-input>
                        </el-form-item>
                        <el-form-item label="生日" prop="human_birthday">
                            <el-date-picker style="width: 160px " type="date" v-model="form.human_birthday" :disabled="true"></el-date-picker>
                        </el-form-item>
                        <el-form-item label="民族" prop="human_race">
                            <template>
                                <el-select v-model="form.human_race" placeholder="请选择民族" style="width: 160px ">
                                    <el-option v-for="item in value._lis1"
                                               :key="item.pbc_id"
                                               :label="item.attribute_name"
                                               :value="item.attribute_name">
                                    </el-option>
                                </el-select>
                            </template>
                        </el-form-item>
                        <el-form-item label="宗教信仰" prop="human_religion">
                            <template>
                                <el-select v-model="form.human_religion" placeholder="请选择宗教信仰" style="width: 160px ">
                                    <el-option v-for="item in value._lis2"
                                               :key="item.pbc_id"
                                               :label="item.attribute_name"
                                               :value="item.attribute_name">
                                    </el-option>
                                </el-select>
                            </template>
                        </el-form-item>
                        <el-form-item label="政治面貌" prop="human_party">
                            <template>
                                <el-select v-model="form.human_party" placeholder="请选择政治面貌" style="width: 160px ">
                                    <el-option v-for="item in value._lis3"
                                               :key="item.pbc_id"
                                               :label="item.attribute_name"
                                               :value="item.attribute_name">
                                    </el-option>
                                </el-select>
                            </template>
                        </el-form-item>
                        <el-form-item label="身份证号" prop="human_id_card">
                            <el-input v-model="form.human_id_card" style="width: 160px"></el-input>
                        </el-form-item>
                        <el-form-item label="社会保障号码" prop="human_society_security_id" label-width="96px">
                            <el-input v-model="form.human_society_security_id" style="width: 144px"></el-input>
                        </el-form-item>
                        <el-form-item label="年龄" prop="human_age" label-width="51px">
                            <el-input v-model="form.human_age" style="width: 104px "></el-input>
                        </el-form-item>
                        <el-form-item label="学历" prop="human_educated_degree" label-width="51px">
                            <template>
                                <el-select v-model="form.human_educated_degree" placeholder="请选择学历" style="width: 142px ">
                                    <el-option v-for="item in value._lis4"
                                               :key="item.pbc_id"
                                               :label="item.attribute_name"
                                               :value="item.attribute_name">
                                    </el-option>
                                </el-select>
                            </template>
                        </el-form-item>
                        <el-form-item label="教育年限" prop="human_educated_years">
                            <template>
                                <el-select v-model="form.human_educated_years" placeholder="请选择教育年限" style="width: 131px ">
                                    <el-option v-for="item in value._lis5"
                                               :key="item.pbc_id"
                                               :label="item.attribute_name"
                                               :value="item.attribute_name">
                                    </el-option>
                                </el-select>
                            </template>
                        </el-form-item>
                        <el-form-item label="学历专业" prop="human_educated_major">
                            <template>
                                <el-select v-model="form.human_educated_major" placeholder="请选择学历专业" style="width: 131px ">
                                    <el-option v-for="item in value._lis6"
                                               :key="item.pbc_id"
                                               :label="item.attribute_name"
                                               :value="item.attribute_name">
                                    </el-option>
                                </el-select>
                            </template>
                        </el-form-item>
                        <el-form-item label="薪酬标准" prop="salary_standard_idT">
                            <template>
                                <el-select v-model="form.salary_standard_idT" placeholder="请选择薪酬" style="width: 170px "
                                           @@change="selectGet">
                                    <el-option v-for="item in value._lis0"
                                               :key="item.ssd_id"
                                               :label="item.standard_name+'/'+item.salary_sum"
                                               :value="item.ssd_id">
                                    </el-option>
                                </el-select>
                            </template>
                        </el-form-item>
                        <el-form-item label="开户行" prop="human_bank" label-width="65px">
                            <el-input v-model="form.human_bank" style="width: 185px "></el-input>
                        </el-form-item>
                        <el-form-item label="账号" prop="human_account" label-width="51px">
                            <el-input v-model="form.human_account" style="width: 142px "></el-input>
                        </el-form-item>
                        <el-form-item label="复核人" prop="checker">
                            <el-input v-model="form.checker" style="width: 131px " :disabled="true"></el-input>
                        </el-form-item>
                        <el-form-item prop="check_time" label="复核时间">
                            <el-date-picker style="width: 173px " :disabled="true" type="datetime" placeholder="选择日期" v-model="form.check_time"></el-date-picker>
                        </el-form-item>
                        <el-form-item label="特长" prop="human_speciality" label-width="40px">
                            <template>
                                <el-select v-model="form.human_speciality" placeholder="请选择特长" style="width: 133px ">
                                    <el-option v-for="item in value._lis8"
                                               :key="item.pbc_id"
                                               :label="item.attribute_name"
                                               :value="item.attribute_name">
                                    </el-option>
                                </el-select>
                            </template>
                        </el-form-item>
                        <el-form-item label="爱好" prop="human_hobby">
                            <template>
                                <el-select v-model="form.human_hobby" placeholder="请选择爱好" style="width: 205px ">
                                    <el-option v-for="item in value._lis9"
                                               :key="item.pbc_id"
                                               :label="item.attribute_name"
                                               :value="item.attribute_name">
                                    </el-option>
                                </el-select>
                            </template>
                        </el-form-item>
                        <el-form-item label="个人履历" prop="human_histroy_records">
                            <el-input type="textarea" v-model="form.human_histroy_records" style="width: 1094px "></el-input>
                        </el-form-item>
                        <el-form-item label="家庭关系信息" prop="human_family_membership">
                            <el-input type="textarea" v-model="form.human_family_membership" style="width: 1094px "></el-input>
                        </el-form-item>
                        <el-form-item label="备注" prop="remark">
                            <el-input type="textarea" v-model="form.remark" style="width: 1094px "></el-input>
                        </el-form-item>
                    </el-form>
                    <div class="_klpo">
                        <el-row>
                            <el-button @@click="Delt()" type="danger">删除</el-button>
                            <el-button @@click="resetForm()">返回</el-button>
                        </el-row>
                    </div>
                </el-main>
            </el-card>
        </el-container>
    </div>
    <script type="text/javascript">
        var vm = new Vue({
            el: "#app",
            data: {
                fileList: [],//图片
                form: {
                    file: [],
                    _list: [],
                    valuo:'',
                    first_kind_id:'',
                    first_kind_name: '',
                    second_kind_id: '',
                    second_kind_name: '',
                    third_kind_id: '',
                    third_kind_name: '',
                    _list1: [],
                    valuo1: '',
                    human_major_kind_id: '',
                    human_major_kind_name: '',
                    human_major_id: '',
                    hunma_major_name: '',
                    human_major_id: '',
                    human_id:'',
                    human_name: '',
                    human_sex: '',
                    human_email: '',
                    human_telephone: '',
                    human_qq: '',
                    human_mobilephone: '',
                    human_address: '',
                    human_postcode: '',
                    human_birthplace: '',
                    human_birthday: '',
                    human_id_card: '',
                    human_society_security_id: '',
                    human_age: '',
                    human_bank: '',
                    human_account: '',
                    checker: '',
                    check_time: '',
                    human_histroy_records: '',
                    human_family_membership: '',
                    remark: '',
                    human_pro_designation: '',
                    human_nationality: '',
                    human_race: '',
                    human_religion: '',
                    human_party: '',
                    human_educated_degree: '',
                    human_educated_years: '',
                    human_educated_major: '',
                    salary_standard_id: '',
                    salary_standard_name: '',
                    human_speciality: '',
                    human_hobby: '',
                    salary_standard_idT:'',
                },
                value: {
                    _lis: [],//国籍
                    _lis1: [],//民族
                    _lis2: [],//宗教信仰
                    _lis3: [],//政治面貌
                    _lis4: [],//学历
                    _lis5: [],//教育
                    _lis6: [],//专业
                    _lis7: [],//职称
                    _lis8: [],//特长
                    _lis9: [],//爱好
                    _lis0: [],//薪酬
                },
            },
            methods: {
                Delt() {
                    this.$confirm('此操作将删除档案, 是否删除?', '提示', {
                        confirmButtonText: '确定',
                        cancelButtonText: '取消',
                        type: 'warning'
                    }).then(() => {
                        //人力资源删除
                        axios.get('/human_fileFo/Delt', {
                            params: {
                                huf_id: this.form.huf_id,
                                human_file_status: 1,
                            }
                        })
                            .then(res => {
                                console.info(res);
                                this.$message({
                                    type: 'success',
                                    message: '删除成功!'
                                });
                                this.resetForm();
                            })
                            .catch(err => {
                                console.info(err);
                            });
                    }).catch(() => {
                        this.$message({
                            type: 'info',
                            message: '已取消删除'
                        });
                    });
                },
                resetForm() {
                    location.href = "/human_fileFo/human_fileFo";
                },
                fill() {
                    //人力资源通过查询回显
                    axios.get('/human_fileTo/Query/' + @ViewBag.huf_id)
                        .then(res => {
                            console.info(res);
                            var ruest = [];
                            ruest.push(res.data.first_kind_id);
                            ruest.push(res.data.second_kind_id);
                            ruest.push(res.data.third_kind_id);
                            this.form.valuo = ruest;
                            this.form.first_kind_id = res.data.first_kind_id;
                            this.form.first_kind_name = res.data.first_kind_name;
                            this.form.second_kind_id = res.data.second_kind_id;
                            this.form.second_kind_name = res.data.second_kind_name;
                            this.form.third_kind_id = res.data.third_kind_id;
                            this.form.third_kind_name = res.data.third_kind_name;
                            var ruest1 = [];
                            ruest1.push(res.data.human_major_kind_id);
                            ruest1.push(res.data.human_major_id);
                            this.form.valuo1 = ruest1;
                            this.form.human_major_kind_id = res.data.human_major_kind_id;
                            this.form.human_major_id = res.data.human_major_id;
                            this.form.human_major_kind_name = res.data.human_major_kind_name;
                            this.form.hunma_major_name = res.data.hunma_major_name;
                            this.form.huf_id = res.data.huf_id,
                            this.form.human_id = res.data.human_id;
                            this.form.human_name = res.data.human_name;
                            this.form.human_address = res.data.human_address;
                            this.form.human_postcode = res.data.human_postcode;
                            this.form.human_pro_designation = res.data.human_pro_designation;
                            this.form.human_telephone = res.data.human_telephone;
                            this.form.human_mobilephone = res.data.human_mobilephone;
                            this.form.human_bank = res.data.human_bank;
                            this.form.human_account = res.data.human_account;
                            this.form.human_qq = res.data.human_qq;
                            this.form.human_email = res.data.human_email;
                            this.form.human_hobby = res.data.human_hobby;
                            this.form.human_speciality = res.data.human_speciality;
                            this.form.human_sex = res.data.human_sex;
                            this.form.human_religion = res.data.human_religion;
                            this.form.human_party = res.data.human_party;
                            this.form.human_nationality = res.data.human_nationality;
                            this.form.human_race = res.data.human_race;
                            this.form.human_birthday = res.data.human_birthday;
                            this.form.human_birthplace = res.data.human_birthplace;
                            this.form.human_age = res.data.human_age;
                            this.form.human_educated_degree = res.data.human_educated_degree;
                            this.form.human_educated_years = res.data.human_educated_years;
                            this.form.human_educated_major = res.data.human_educated_major;
                            this.form.human_society_security_id = res.data.human_society_security_id;
                            this.form.human_id_card = res.data.human_id_card;
                            this.form.remark = res.data.remark;
                            this.form.human_histroy_records = res.data.human_histroy_records;
                            this.form.human_family_membership = res.data.human_family_membership;
                            this.form.checker = res.data.checker;
                            this.form.check_time = res.data.check_time;
                            var obj = {};
                            obj.url = res.data.human_picture;
                            this.fileList.push(obj);
                            //薪酬查询回显
                            axios.get('/salary_standard/FallT', {
                                params:{
                                    id:res.data.salary_standard_id,
                            }
                            })
                                .then(res => {
                                    console.info(res);
                                    this.form.salary_standard_idT = res.data[0].standard_name + "/" + res.data[0].salary_sum;
                                })
                                .catch(err => {
                                    console.info(err);
                                });
                        })
                        .catch(err => {
                            console.info(err);
                        });
                    //机构查询
                    axios.get('/engage_major_release/Dg', {
                    })
                        .then(res => {
                            console.info(res);
                            this.form._list = res.data;
                        })
                        .catch(err => {
                            console.info(err);
                        });
                    //职位查询
                    axios.get('/engage_major_release/Dgto', {
                    })
                        .then(res => {
                            console.info(res);
                            this.form._list1 = res.data;
                        })
                        .catch(err => {
                            console.info(err);
                        });
                    this.ent();
                },
            },
            //可以对vue的数据和方法进行操作,不能对DOM进行操作
            created: function () {
                this.fill();
            }
        });
    </script>
    <style>
        .hide .el-upload--picture-card {
            display: none;
        }

        .kbl {
            width: 148px;
            height: 148px;
            overflow: hidden;
            float: right;
        }

        ._klpo {
            float: right;
        }

        .el-card__body {
            padding: 0px;
        }

    </style>
</body>
</html>
